package logic.common.player.playerListeners;

import com.jme.math.Vector3f;

import logic.SpawnLocation;
import logic.common.player.Player;

public class PlayerSpawnLocation extends SpawnLocation {
	
	protected Player player;
	
	public PlayerSpawnLocation(Player player) {
		super(Vector3f.ZERO.clone(), 0f);
		this.player = player;
	}
	
	@Override
	public Vector3f getRandomSpawn() {
		Vector3f spawn = super.getRandomSpawn();
		return player.getHunter().getLocalTranslation().add(spawn);
	}
	
	@Override
	public float getOrientationAngle() {
		return player.getHunter().getMoveDirection().angleBetween(Vector3f.UNIT_Z.clone());
	}
}